// src/models/jdf.ts
export interface JDFNode {
    id: string;
    nodeName: string;
    attributes: JDFAttribute[];
    children: JDFNode[];
    textContent?: string;
    parentId?: string;
    level: number;
}

export interface JDFAttribute {
    name: string;
    value: string;
}

export interface FlowNode {
    id: string;
    type: string;
    data: {
        nodeName: string;
        attributes: JDFAttribute[];
        textContent?: string;
        hasChildren: boolean;
        level: number;
        isExpanded: boolean;
        childrenIds: string[];
    };
    position: {
        x: number;
        y: number;
    };
    parentId?: string;
    hidden?: boolean;
}

export interface FlowEdge {
    id: string;
    source: string;
    target: string;
    type: 'smoothstep';
    hidden?: boolean;
}

export interface ParseResult {
    success: boolean;
    document?: Document;
    error?: string;
    nodes: FlowNode[];
    edges: FlowEdge[];
}